home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Inspector.h
-
- Contains: Interface for a ASLM Test application.
-
- Copyright: © 1991-1995 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #ifndef __INSPECTOR__
- #define __INSPECTOR__
-
- #ifndef __APPLICATION__
- #include "Application.h"
- #endif
-
- #ifndef __LIBRARYMANAGERCLASSES__
- #include <LibraryManagerClasses.h>
- #endif
-
- class TRegisteredObjectsWindow;
- class TRegisteredObjects;
- class TInspector;
- class TLibraryManager;
-
- class TInspector;
-
- const int kMaxDocuments = 50;
- const int kMaxTests = 50;
- const int kWindowListStart = 6; /* where the list of windows starts in the Windows menu */
- const int kTestsListStart = 8; /* where the list of tests starts in the Tests menu */
-
- enum {kNoCmd, kReloadLibraryManagerCmd, kUnloadLibraryManagerCmd, kGotoSimpleProgramCmd};
-
- const size_t kInspectorPoolSize = 25000;
-
- #define kInspectorLibID "slm:tapp$,1.2"
-
- /**********************************************************************
- ** class TInspector
- ***********************************************************************/
-
- #define kTInspectorID "appl:insp$TInspector,1.2"
-
- class TInspector : public TApplication
- {
- public:
- _CDECL TInspector(QDGlobals* qdPtr, BooleanParm initToolbox = true);
- virtual ~_CDECL TInspector();
-
- virtual void DoIdle();
- virtual void AdjustMenus();
- virtual void AdjustCursor();
- virtual void DoMenuCommand(short menuID, short menuItem);
- virtual void _CDECL DoNew(TRegisteredObjects*); // called by ASLM
- virtual void Terminate();
-
- // New Methods
-
- virtual void OpenPrefsFile();
- virtual void ClosePrefsFile();
- virtual short GetPrefsFileRefNum();
-
- virtual void RunTest(TClassID* testname);
-
- TScheduler* GetUpdateListsScheduler();
- short GetLibraryManagerCmd();
-
- static void UnloadLibraryManager();
- static void LoadLibraryManager();
- static int Main();
- static void _CDECL DeathNotifierProc(TInspector* me, EventCode event, OSErrParm, TLibraryManager* libmgr);
- static void Boot();
- static void Cleanup();
-
- static void SimpleProgram();
- static void SimpleDoEventLoop();
- static void SimpleAdjustMenus();
- static void SimpleDoMenuCommand(short menuID, short menuItem);
-
- private:
- short fLibraryManagerCmd;
- TScheduler* fUpdateListsScheduler;
- TDocument* fWindowsMenuDocList[kMaxDocuments]; // documents in the Windows menu
- TClassID* fTestsMenuTestList[kMaxTests]; // tests in the Tests menu
- size_t fNumTests;
- Boolean fVerbose;
- Boolean fDebug;
- Boolean fDoLoad;
- Boolean fGrowPool;
- long fIterationCount;
- Point fNextWindowLocation;
- short fHTopWindowLocation;
- short fPrefsFileRefNum;
- };
-
- /* -----------------------------------------------------------------
- inline methods
- ----------------------------------------------------------------- */
-
- inline TScheduler* TInspector::GetUpdateListsScheduler()
- {
- return fUpdateListsScheduler;
- }
-
- inline short TInspector::GetLibraryManagerCmd()
- {
- return fLibraryManagerCmd;
- }
-
- #endif
-